<html>
<head><meta charset="utf-8"><title>truncation · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html">truncation</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="188961641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188961641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188961641">(Feb 24 2020 at 20:15)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="232957">@Jack Huey</span> -- truncation today is only used to check <em>if</em> truncation would occur, right?</p>



<a name="188961649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188961649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188961649">(Feb 24 2020 at 20:15)</a>:</h4>
<p>in which case we flounder or something</p>



<a name="188961663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188961663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188961663">(Feb 24 2020 at 20:15)</a>:</h4>
<p>yes exactly</p>



<a name="188961792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188961792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188961792">(Feb 24 2020 at 20:17)</a>:</h4>
<p>as part of some of the other goals, I wanted to add a <code>Visitor</code> (like <code>FOlder</code>, but it doesn't recreate the IR as it goes, but instead propagates some other value)</p>



<a name="188961795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188961795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188961795">(Feb 24 2020 at 20:17)</a>:</h4>
<p>in fact, I had a branch somewhere doing this...</p>



<a name="188961803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188961803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188961803">(Feb 24 2020 at 20:17)</a>:</h4>
<p>anyway, I think that would be useful here too  (and more efficient)</p>



<a name="188961815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188961815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188961815">(Feb 24 2020 at 20:17)</a>:</h4>
<p>and I see another case (<code>UCollector</code>) where I think it'd be of use</p>



<a name="188961821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188961821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188961821">(Feb 24 2020 at 20:17)</a>:</h4>
<p>I am going to add that as a mentorable task and into the roadmap</p>



<a name="188962715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188962715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188962715">(Feb 24 2020 at 20:29)</a>:</h4>
<p>Yeah, switching truncation checking to a visitor would work fine</p>



<a name="188962749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188962749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188962749">(Feb 24 2020 at 20:29)</a>:</h4>
<p>the other place I wanted a visitor is for the work to establish "syntactic equality"</p>



<a name="188962763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188962763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188962763">(Feb 24 2020 at 20:29)</a>:</h4>
<p>sometimes we need to do stuff like "count how many binders there are"</p>



<a name="188962769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188962769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188962769">(Feb 24 2020 at 20:29)</a>:</h4>
<p>although maybe with the debruijn changes that wouldn't be needed</p>



<a name="188962918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188962918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188962918">(Feb 24 2020 at 20:31)</a>:</h4>
<p>I figured that's what you wanted a visitor for :)</p>



<a name="188972327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/truncation/near/188972327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/truncation.html#188972327">(Feb 24 2020 at 22:18)</a>:</h4>
<p>opened <a href="https://github.com/rust-lang/chalk/issues/333" target="_blank" title="https://github.com/rust-lang/chalk/issues/333">https://github.com/rust-lang/chalk/issues/333</a> -- re: Visit trait</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>